import request from 'uview-ui/libs/request'
class User {
  /**
	 * 获取验证码
	 * @param {Object} data
	 */
  async getCode(data) {
    return await request.get('/v1/member/code', data)
  }

  /**
	 * 账号密码登录
	 * @param {Object} data
	 */
  async login(data) {
    return await request.post('/v1/member/login', data)
  }
  
  /**
   * 手机号验证码登录
   * @param {Object} data
   */
  async codeLogin(data) {
    return await request.post('/v1/member/login/by/code', data)
  }

  /**
	 * 获取个人信息
	 */
  async getMember() {
    return await request.get('/v1/member/info')
  }
  
  
}

export default new User()
